<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@ taglib prefix="spring" uri="/spring"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/"; %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <html>
        <head>
            <base href="<%=basePath%>"><title>菜单</title>
            <meta http-equiv="pragma" content="no-cache">
            <meta http-equiv="cache-control" content="no-cache">
            <meta http-equiv="expires" content="0">
            <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
            <meta http-equiv="description" content="This is my page">
            <link rel="stylesheet" type="text/css" href="asset/css/jquery-ui/paper/jquery-ui-1.8.16.custom.css">
            <link rel="stylesheet" type="text/css" href="asset/css/zTreeStyle/zTreeStyle.css">
            <link rel="stylesheet" type="text/css" href="asset/css/layout/layout-default-latest.css">
            <link rel="stylesheet" type="text/css" href="asset/css/flexigrid/flexigrid.css">
            <link rel="stylesheet" type="text/css" href="asset/css/validate/bvalidator.css">
            <link rel="stylesheet" type="text/css" href="asset/base/base.css">
            <link rel="stylesheet" type="text/css" href="asset/base/menu/menu.css">
            <script type="text/javascript" src="asset/js/jquery/jquery-1.7.1.min.js">
            </script>
            <script type="text/javascript" src="asset/js/jquery-ui/jquery-ui-1.8.16.custom.min.js">
            </script>
            <script type="text/javascript" src="asset/js/ztree/jquery.ztree.core-3.0.min.js">
            </script>
            <script type="text/javascript" src="asset/js/jquery-ui/jquery.layout-latest.js">
            </script>
            <script type="text/javascript" src="asset/js/flexigrid/flexigrid.js">
            </script>
            <script type="text/javascript" src="asset/js/validate/jquery.bvalidator.js">
            </script>
            <script type="text/javascript" src="asset/base/menu/menu.js">
            </script>
        </head>
        <body>
            <div class="ui-layout-west">
                <div class="ui-layout-content ui-widget-content">
                    <ul id="menu_tree" class="ztree">
                    </ul>
                </div>
            </div>
            <div class="ui-layout-center">
                <div class="ui-layout-content ui-widget-content">
                    <table id="menu_table">
                    </table>
                </div>
            </div>
            <div id="errMsg" style="display:none;">${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}</div>
            <div id="dialog-form" title="添加菜单" style="display:none;">
                <p class="tips ui-state-highlight ui-corner-all">添加菜单,所有选项必须填写!</p>
                <form id="menu_form" method="post">
                    <table style="width:100%;">
                    	<tr>
                    		<td style="width:80px;"><label for="menu_name"><spring:message code="menu.addName"/>:</label></td>
                        	<td><input type="text" name="menu_name" id="menu_name" data-bvalidator="required" data-bvalidator-msg="请输入姓名!" class="text ui-widget-content ui-corner-all" /></td>
							<td style="width:80px;"><label for="menu_url">URL:</label></td>
                        	<td><input type="text" name="menu_url" id="menu_url" data-bvalidator="required" data-bvalidator-msg="请输入URL!" class="text ui-widget-content ui-corner-all" /></td>
                        </tr>
						<tr>
                        	<td><label for="menu_parent">父节点:</label></td>
                        	<td><select id="menu_parent" name="menu_parent" class="text ui-widget-content ui-corner-all" />
							</select>
							</td>
							<td><label for="menu_icon">图标:</label></td>
                        	<td><input type="text" name="menu_icon" id="menu_icon" value="" class="text ui-widget-content ui-corner-all" /></td>
                        </tr>
						<tr>
	                        <td><label for="menu_type">节点类型:</label></td>
                        	<td>
                        		<select id="menu_type" name="menu_type" class="text ui-widget-content ui-corner-all" />
									<option value="0">页面</option>
									<option value="1">操作</option>
									<option value="2">普通节点</option>
								</select>
							</td>
							<td></td>
	                        <td></td>
                	 	</tr>
						<tr>
	                        <td><label for="isleaf">是否子节点:</label></td>
	                        <td><input type="checkbox" name="isleaf" id="isleaf" class="ui-widget-content ui-corner-all" /></td>
							<td><label for="isvisiable">是否可见:</label></td>
	                        <td><input type="checkbox" name="isvisiable" id="isvisiable" class="ui-widget-content ui-corner-all" /></td>
                	 	</tr>
						<tr>
	                        <td><label for="issys">是否系统默认:</label></td>
	                        <td><input type="checkbox" name="issys" id="issys" class="ui-widget-content ui-corner-all" /></td>
							<td><label for="menu_rel">是否默认关联:</label></td>
	                        <td><input type="checkbox" disabled="true" name="menu_rel" id="menu_rel" class="ui-widget-content ui-corner-all" /></td>
                	 	</tr>
						<tr>
	                        <td><label for="memo">描述:</label></td>
                        	<td colspan="3">
                        		<textarea name="memo" id="memo" class="ui-widget-content ui-corner-all" style="width:100%;height:90px;overflow:auto;"></textarea>
							</td>
                	 	</tr>
					</table>
				</form>
            </div>
			<div id="find-form" title="查询" style="display:none;">
                <p class="tips ui-state-highlight ui-corner-all">此为多条件查询!</p>
                <form id="findmenu_form" method="post">
                    <table style="width:100%;">
                    	<tr>
                    		<td style="width:80px;"><label for="_menu_name"><spring:message code="menu.addName"/>:</label></td>
                        	<td><input type="text" name="_menu_name" id="_menu_name" class="text ui-widget-content ui-corner-all" /></td>
                        	<td><label for="_menu_parent">父节点:</label></td>
                        	<td><select id="_menu_parent" name="_menu_parent" class="text ui-widget-content ui-corner-all" />
							</select>
							</td>
                        </tr>
						<tr>
	                        <td><label for="_menu_type">节点类型:</label></td>
                        	<td>
                        		<select id="_menu_type" name="_menu_type" class="text ui-widget-content ui-corner-all" />
									<option value="">请选择</option>
									<option value="0">页面</option>
									<option value="1">操作</option>
									<option value="2">普通节点</option>
								</select>
							</td>
							<td><label for="_menu_rel">是否默认关联:</label></td>
	                        <td>
	                        	<select id="_menu_rel" name="_menu_rel" class="text ui-widget-content ui-corner-all">
		                        	<option value=''>请选择</option>
									<option value='1'>是</option>
									<option value='0'>否</option>
	                        	</select>
							</td>
                	 	</tr>
						<tr>
	                        <td><label for="_isleaf">是否子节点:</label></td>
	                        <td>
	                        	<select id="_isleaf" name="_isleaf" class="text ui-widget-content ui-corner-all">
		                        	<option value=''>请选择</option>
									<option value='1'>是</option>
									<option value='0'>否</option>
	                        	</select>
							</td>
							<td><label for="_isvisiable">是否可见:</label></td>
	                        <td><select id="_isvisiable" name="_isvisiable" class="text ui-widget-content ui-corner-all">
		                        	<option value=''>请选择</option>
									<option value='1'>是</option>
									<option value='0'>否</option>
	                        	</select></td>
                	 	</tr>
					</table>
				</form>
            </div>
			<div id="menu_message" style="display:none;">
				<p>
					<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
				</p>
			</div>
        </body>
    </html>